import time


def count_time(func):
    def inner():
        start_time = time.time()
        func()
        stop_time = time.time()
        print(f'函数执行时间为{stop_time - start_time}秒')

    return inner


@count_time
def show():
    for i in range(3):
        print(f"第 {i + 1} 次输出")
        time.sleep(0.5)


if __name__ == '__main__':
    show()
